from pymediawiki.pymediawiki import PyMediaWiki

data = """
== Before you start ==
; MediaWiki is server software.
: As with any software that you expose to the internet, there may be bugs or security problems. Do not install MediaWiki unless you intend to keep up with [http://mail.wikipedia.org/mailman/listinfo/mediawiki-announce security upgrades] (please subscribe to receive announcements of security updates).

* <test param1="one">oidjtjgg</test>

"""

w = PyMediaWiki()

def testHook(content,attributes={}):
    return u'test %s %s' % (attributes.get('param1'), content)
 

w.registerTagHook('test', testHook)

print w.parse(data)
